﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="eVoting.Registration" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

                        <table>
                            <tr>
                                <td align="center" colspan="2">
                                    Sign Up for Your New Account</td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="gucID">Student ID:</asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="gucID" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" 
                                        ControlToValidate="gucID" ErrorMessage="GUC ID is required." 
                                        ToolTip="GUC ID is required." ValidationGroup="CreateUserWizard1" 
                                        ForeColor="#FF003A">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>

                            <tr>
                                <td align="right">
                                    <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstName">First Name:</asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="FirstName" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" 
                                        ControlToValidate="FirstName" ErrorMessage="Security answer is required." 
                                        ToolTip="Security answer is required." ValidationGroup="CreateUserWizard1" 
                                        ForeColor="#FF003A">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="MiddleNameLabel" runat="server" AssociatedControlID="MiddleName">Middle Name:</asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="MiddleName" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastName">Last Name:</asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="LastName" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="AnswerRequired0" runat="server" 
                                        ControlToValidate="LastName" ErrorMessage="Security answer is required." 
                                        ToolTip="Security answer is required." ValidationGroup="CreateUserWizard1" 
                                        ForeColor="#FF003A">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>

                            <tr>
                                <td align="right">
                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="ConfirmPassword"
                                        ValidationExpression="(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$" Display="Dynamic"
                                        ErrorMessage="Password must be 8 characters and have both letters and numbers." />
                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" 
                                        ControlToValidate="Password" ErrorMessage="Password is required." 
                                        ToolTip="Password is required." ValidationGroup="CreateUserWizard1" 
                                        ForeColor="#FF003A">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="ConfirmPasswordLabel" runat="server" 
                                        AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="ConfirmPassword"
                                        ValidationExpression="(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$" Display="Dynamic"
                                        ErrorMessage="Password must be 8 characters and have both letters and numbers." />
                                    <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                        ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
                                        ValidationGroup="CreateUserWizard1" ForeColor="#FF003A">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" 
                                        ControlToValidate="Email" ErrorMessage="E-mail is required." 
                                        ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1" 
                                        ForeColor="#FF003A">*</asp:RequiredFieldValidator>
                                    <asp:Label ID="lbl" runat="server" Text="@student.guc.edu.eg"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="StudyGroup">Study Group</asp:Label>
                                </td>
                                <td>
                                    <asp:DropDownList ID="StudyGroup" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
 <!--                           <tr>
                                <td align="right">
                                    <asp:Label ID="QuestionLabel0" runat="server" AssociatedControlID="AcademicYear">Academic Year:</asp:Label>
                                </td>
                                <td>
                                    <asp:DropDownList ID="AcademicYear" runat="server" >
                                    </asp:DropDownList>
                                </td>
                            </tr>
-->
                            
                            <tr>
                                <td align="center" colspan="2">
                                    <asp:CompareValidator ID="PasswordCompare" runat="server" 
                                        ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                        Display="Dynamic" 
                                        ErrorMessage="The Password and Confirmation Password must match." 
                                        ForeColor="#FF003A" ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
                                    <br />
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="gucID" Display="Dynamic" 
                                        ErrorMessage="Please enter your GUC ID number (eg: 10-1234)" 
                                        ForeColor="#FF003A" ValidationExpression="[0-9][0-9]?-[0-9]*" 
                                        ValidationGroup="CreateUserWizard1"></asp:RegularExpressionValidator>
                                    <br />
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                        ControlToValidate="Email" 
                                        ErrorMessage="Please enter your GUC username (eg: ahmed.mahoud)" 
                                        ForeColor="#FF003A" 
                                        ValidationExpression="(\w+)((-)(\w+))?.(\w+)(-\w+)?"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2" style="color:Red;">
                                    <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                    <br />
                                    <br />
                                    <asp:Button ID="btn_register" runat="server" Text="Register" 
                                        onclick="btn_register_Click" />
                                </td>
                            </tr>
                        </table>
                   
</asp:Content>
